/*
*  Copyright 2020-2021 Li Fei
*
*  Licensed under the Apache License, Version 2.0 (the "License");
*  you may not use this file except in compliance with the License.
*  You may obtain a copy of the License at
*
*  http://www.apache.org/licenses/LICENSE-2.0
*
*  Unless required by applicable law or agreed to in writing, software
*  distributed under the License is distributed on an "AS IS" BASIS,
*  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*  See the License for the specific language governing permissions and
*  limitations under the License.
*/
package com.pengshun.modules.api.coal.domain;

import lombok.Data;
import io.swagger.annotations.ApiModelProperty;
import javax.persistence.*;
import java.sql.Timestamp;
import java.math.BigDecimal;
import java.util.List;

/**
* @description /
* @author lifei
* @date 2020-11-04
**/
@Entity
@Data
@Table(name="ps_mine_mouth")
public class CoalMine{

    @Column(name = "user_id")
    @ApiModelProperty(value = "userId")
    private Long userId;

    @Column(name = "user_type")
    @ApiModelProperty(value = "添加类型")
    private Integer userType;

    @Column(name = "status")
    @ApiModelProperty(value = "数据状态")
    private Integer status;

    @Column(name = "app_show")
    @ApiModelProperty(value = "appShow")
    private Integer appShow;

    @Column(name = "mine_mouth_name",unique = true)
    @ApiModelProperty(value = "mineMouthName")
    private String mineMouthName;

    @Column(name = "introduce")
    @ApiModelProperty(value = "introduce")
    private String introduce;

    @Column(name = "image1")
    @ApiModelProperty(value = "image1")
    private String image1;

    @Column(name = "image2")
    @ApiModelProperty(value = "image2")
    private String image2;

    @Column(name = "image3")
    @ApiModelProperty(value = "image3")
    private String image3;

    @Column(name = "image4")
    @ApiModelProperty(value = "image4")
    private String image4;

    @Column(name = "province")
    @ApiModelProperty(value = "province")
    private String province;

    @Column(name = "city")
    @ApiModelProperty(value = "city")
    private String city;

    @Column(name = "adcode")
    @ApiModelProperty(value = "adcode")
    private String adcode;

    @Column(name = "district")
    @ApiModelProperty(value = "district")
    private String district;

    @Column(name = "sub_address")
    @ApiModelProperty(value = "subAddress")
    private String subAddress;

    @Column(name = "map_address")
    @ApiModelProperty(value = "mapAddress")
    private String mapAddress;

    @Column(name = "lng_x")
    @ApiModelProperty(value = "lngX")
    private BigDecimal lngX;

    @Column(name = "lat_y")
    @ApiModelProperty(value = "latY")
    private BigDecimal latY;

    @Column(name = "detail_address")
    @ApiModelProperty(value = "detailAddress")
    private String detailAddress;

    @Column(name = "create_by")
    @ApiModelProperty(value = "创建者")
    private String createBy;

    @Column(name = "update_by")
    @ApiModelProperty(value = "更新者")
    private String updateBy;

    @Column(name = "create_time")
    @ApiModelProperty(value = "创建日期")
    private Timestamp createTime;

    @Column(name = "update_time")
    @ApiModelProperty(value = "更新时间")
    private Timestamp updateTime;

    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Column(name = "mine_mouth_id")
    @ApiModelProperty(value = "id")
    private Long mineMouthId;

    @Column(name = "linkman")
    @ApiModelProperty(value = "联系人")
    private String linkman;

    @Column(name = "linkman_phone")
    @ApiModelProperty(value = "联系人电话")
    private String linkmanPhone;

    @ApiModelProperty(value = "煤矿类型1煤矿，2洗煤厂，3其他")
    private  Integer type;

    @ApiModelProperty(value = "储量")
    private  Integer reserves;

    @ApiModelProperty(value = "年产量")
    @Column(name = "year_out_put")
    private  Integer yearOutPut;

    @ApiModelProperty(value = "公司名称")
    @Column(name = "company_name")
    private  String companyName;

    private  String introduction;

    @Column(name = "province_id")
    @ApiModelProperty(value = "省份编码")
    private  Integer provinceId;

    @Column(name = "city_id")
    @ApiModelProperty(value = "市编码")
    private  Integer cityId;

    @Column(name = "district_id")
    @ApiModelProperty(value = "区编码")
    private  Integer districtId;

    @ApiModelProperty(value = "等级 1优质")
    private  Integer level;

    @OneToMany(cascade={CascadeType.PERSIST,CascadeType.REMOVE})
    @JoinColumn(name = "mine_mouth_id")
    private List<Coal> coals;

}